package com.zadtek.shopmall.net;

import com.zadtek.shopmall.bean.AddressItem;
import com.zadtek.shopmall.bean.BrowingProductItem;
import com.zadtek.shopmall.bean.CarCity;
import com.zadtek.shopmall.bean.CityBean;
import com.zadtek.shopmall.bean.CouponResponse;
import com.zadtek.shopmall.bean.EvaluateProductBean;
import com.zadtek.shopmall.bean.GetBoundsResponse;
import com.zadtek.shopmall.bean.GuesLikeProductItem;
import com.zadtek.shopmall.bean.HomeBean;
import com.zadtek.shopmall.bean.HomeBean2;
import com.zadtek.shopmall.bean.HomeShopBean;
import com.zadtek.shopmall.bean.IndexProductItem;
import com.zadtek.shopmall.bean.InfoBean;
import com.zadtek.shopmall.bean.InfoType;
import com.zadtek.shopmall.bean.LoginResponse;
import com.zadtek.shopmall.bean.MainType;
import com.zadtek.shopmall.bean.MangeMoneyBean;
import com.zadtek.shopmall.bean.MeBean;
import com.zadtek.shopmall.bean.NearbyItemBean;
import com.zadtek.shopmall.bean.OperateResponseBean;
import com.zadtek.shopmall.bean.OperateResponseBean2;
import com.zadtek.shopmall.bean.OperateResponseBean3;
import com.zadtek.shopmall.bean.OrderBean;
import com.zadtek.shopmall.bean.OrderDetailBean;
import com.zadtek.shopmall.bean.OrederItem;
import com.zadtek.shopmall.bean.ProcessItem;
import com.zadtek.shopmall.bean.ProductDetailInfoBean;
import com.zadtek.shopmall.bean.ProductDetailItem;
import com.zadtek.shopmall.bean.ProductEvaluateBean;
import com.zadtek.shopmall.bean.RCItem;
import com.zadtek.shopmall.bean.RedListBean;
import com.zadtek.shopmall.bean.ShopCartData;
import com.zadtek.shopmall.bean.ShopDetailBean;
import com.zadtek.shopmall.bean.ShopDetailProductItem;
import com.zadtek.shopmall.bean.ShopDetailtem;
import com.zadtek.shopmall.bean.ShopLikeItem;
import com.zadtek.shopmall.bean.SplashResponseBean;
import com.zadtek.shopmall.bean.TaskItem1;
import com.zadtek.shopmall.bean.TaskItem2;
import com.zadtek.shopmall.bean.UpLoadImgResponse;
import com.zadtek.shopmall.bean.UpdateVersionBean;
import com.zadtek.shopmall.bean.User;
import com.zadtek.shopmall.bean.WithDrawListBean;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Created by Zackv on 2018/3/16.
 */

public interface Api {

    @FormUrlEncoded
    @POST("interface.php?m=login")
    public Observable<BaseResponse<LoginResponse>> login(@FieldMap Map<String, Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=register")
    public Observable<BaseResponse<LoginResponse>> register(@FieldMap Map<String, Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=getsmscode")
    public Observable<BaseResponse<LoginResponse>> getsmscode(@FieldMap Map<String, Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=resetpassword")
    public Observable<BaseResponse<LoginResponse>> resetpassword(@FieldMap Map<String, Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=getcategory")
    public Observable<BaseResponse<List<MainType>>> getcategory(@FieldMap Map<String, Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=gethotsearch")
    public Observable<BaseResponse<List<String>>> gethotsearch(@FieldMap Map<String, Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=getbalance")
    public Observable<BaseResponse<MangeMoneyBean>> getbalance(@FieldMap Map<String, Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=redencelop")
    public Observable<BaseResponse<RedListBean>> redenvelop(@FieldMap Map<String, Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=getproductdetail")
    public Observable<BaseResponse<ProductDetailItem>> getproductdetail(@FieldMap Map<String, Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=getproductinfo")
    public Observable<BaseResponse<ProductDetailInfoBean>> getproductinfo(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=index_get_errand")
    public Observable<BaseResponse<OperateResponseBean3>> submitTask(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=index_help_you_qu")
    public Observable<BaseResponse<OperateResponseBean3>> submitTask2(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=index_help_you_song")
    public Observable<BaseResponse<OperateResponseBean3>> submitTask3(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=index_get_car")
    public Observable<BaseResponse<OperateResponseBean2>> publishCarInfo(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=index_get_nearby")
    public Observable<BaseResponse<List<NearbyItemBean>>> getCarInfo(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=index_post_message")
    public Observable<BaseResponse<OperateResponseBean2>> publishInfo(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=index_get_message")
    public Observable<BaseResponse<List<InfoBean>>> getInfo(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=index_message_status")
    public Observable<BaseResponse<OperateResponseBean3>> changeInfoStatus(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=getbonus")
    public Observable<BaseResponse<GetBoundsResponse>> getbonus(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=index_order_detail")
    public Observable<BaseResponse<OrderDetailBean>> getOrder(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=index_get_order")
    public Observable<BaseResponse<List<OrderBean>>> getorders(@FieldMap Map<String,Object> params);

    @GET("interface.php?m=index_help_qu")
    public Observable<BaseResponse<List<TaskItem1>>> fetch();


    @GET("interface.php?m=index_help_song")
    public Observable<BaseResponse<List<TaskItem1>>> delivery();


    @GET("interface.php?m=index_help_buy")
    public Observable<BaseResponse<List<TaskItem1>>> buy();

    @GET("interface.php?m=index_get_baner")
    public Observable<BaseResponse<List<TaskItem1>>> get_banner();

    @GET("interface.php?m=index_help_buy_detail")
    public Observable<BaseResponse<List<TaskItem2>>> buy(@Query("id") String id);

    @GET("interface.php?m=index_help_song_detail")
    public Observable<BaseResponse<List<TaskItem2>>> delivery(@Query("id") String id);

    @GET("interface.php?m=index_help_qu_detail")
    public Observable<BaseResponse<List<TaskItem2>>> fetch(@Query("id") String id);


    @POST("interface.php?m=checknewversion")
    public Observable<BaseResponse<UpdateVersionBean>> checkUpdate();

    @FormUrlEncoded
    @POST("interface.php?m=takebonus")
    public Observable<BaseResponse<OperateResponseBean>> takebonus(@FieldMap Map<String,Object> params);

    @POST("interface.php?m=index_post_image")
    public Observable<BaseResponse<UpLoadImgResponse>> uploadImg(@Body RequestBody params);

    @GET("interface.php?m=index_get_city")
    public Observable<BaseResponse<List<CarCity>>> getCarCity();

    @GET("interface.php?m=index_get_indextype")
    public Observable<BaseResponse<List<InfoType>>> getInfoType();

    @FormUrlEncoded
    @POST("interface.php?m=get_userInfo")
    public Observable<BaseResponse<User>> getUserInfo(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=index_shop_nearby")
    public Observable<BaseResponse<List<HomeShopBean>>> getNearByShop(@FieldMap Map<String,Object> params);



    @FormUrlEncoded
    @POST("interface.php?m=get_user_address")
    public Observable<BaseResponse<List<AddressItem>>> getAddressList(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=user_add_address")
    public Observable<BaseResponse<OperateResponseBean3>> addAddress(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=user_make_address")
    public Observable<BaseResponse<OperateResponseBean3>> defaultAddress(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=user_address_del")
    public Observable<BaseResponse<OperateResponseBean3>> delAddress(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=index_get_evaluate")
    public Observable<BaseResponse<List<EvaluateProductBean>>> getEvaluateList(@FieldMap Map<String,Object> params);


    @FormUrlEncoded
    @POST("interface.php?m=index_post_evaluate")
    public Observable<BaseResponse<OperateResponseBean3>> evaluate(@FieldMap Map<String,Object> params);

    @GET("interface.php?m=index_get_region")
    public Observable<BaseResponse<List<CityBean>>> getAreaList();

    @GET("HomeData")
    public Observable<BaseResponse<HomeBean>> getHomeData();

    @FormUrlEncoded
    @POST("api?m=gethomedata")
    public Observable<BaseResponse<HomeBean2>> getHomeData2(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=index_get_cart")
    public Observable<BaseResponse<List<ShopCartData>>> getShopCartData(@FieldMap Map<String,Object> params);
    @FormUrlEncoded
    @POST("interface.php?m=index_get_like")
    public Observable<BaseResponse<List<GuesLikeProductItem>>> getLike(@FieldMap Map<String,Object> params);

    @GET("TypeData")
    public Observable<BaseResponse<List<MainType>>> getTypeData();

    @GET("HotSearch")
    public Observable<BaseResponse<List<String>>> getHotSearch();

    @FormUrlEncoded
    @POST("interface.php?m=getmedata")
    public Observable<BaseResponse<MeBean>> getMeData(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=index_shopInfo")
    public Observable<BaseResponse<ShopDetailBean>> getShopInfoData(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=index_product_list")
    public Observable<BaseResponse<List<ShopDetailProductItem>>> getShopListData(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=index_store_focus")
    public Observable<BaseResponse<OperateResponseBean3>> likeshop(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("ProductInfoData")
    public Observable<BaseResponse<ProductDetailItem>> getProductInfo(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("ProductEvaluateData")
    public Observable<BaseResponse<ProductEvaluateBean>> getProductEvaluateInfo(@FieldMap Map<String,Object> params);


    @FormUrlEncoded
    @POST("Shops")
    public Observable<BaseResponse<List<ShopDetailtem>>> getShops(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("Products")
    public Observable<BaseResponse<List<IndexProductItem>>> getProducts(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=user_footprint")
    public Observable<BaseResponse<List<BrowingProductItem>>> getBrowingHistory(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=user_footprint_delete")
    public Observable<BaseResponse<OperateResponseBean>> delBrowingHistory(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=collectproduct")
    public Observable<BaseResponse<List<IndexProductItem>>> getCollectProducts(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=deletecollectproducts")
    public Observable<BaseResponse<OperateResponseBean>> delCollectProduct(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=collect_store")
    public Observable<BaseResponse<List<ShopLikeItem>>> getLikeShops(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=collect_store_delete")
    public Observable<BaseResponse<OperateResponseBean3>> delLikeShop(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=userInfo_update")
    public Observable<BaseResponse<OperateResponseBean3>> updateUserInfo(@FieldMap Map<String,Object> params);


    @FormUrlEncoded
    @POST("interface.php?m=changepassword")
    public Observable<BaseResponse<OperateResponseBean2>> changePassword(@FieldMap Map<String,Object> params);

    @POST("interface.php?m=user_picture")
    public Observable<BaseResponse<OperateResponseBean3>> updateUserAvatar(@Body RequestBody params);


    @FormUrlEncoded
    @POST("Balance")
    public Observable<BaseResponse<MangeMoneyBean>> getBalance(@FieldMap Map<String,Object> params);


    @FormUrlEncoded
    @POST("interface.php?m=account_detail")
    public Observable<BaseResponse<List<OrederItem>>> getAccountDetail(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=account_log")
    public Observable<BaseResponse<WithDrawListBean>> getWithDrawList(@FieldMap Map<String,Object> params);
    @FormUrlEncoded
    @POST("interface.php?m=account_coupont")
    public Observable<BaseResponse<CouponResponse>> getCoupon(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=delete_cart")
    public Observable<BaseResponse<OperateResponseBean3>> delete_cart(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=good_refound")
    public Observable<BaseResponse<List<RCItem>>> getAfterMarket(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("Process")
    public Observable<BaseResponse<List<ProcessItem>>> getProcess(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("Process")
    public Observable<BaseResponse<List<OperateResponseBean>>> applyAftermarketService(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("addToShopCart")
    public Observable<BaseResponse<OperateResponseBean>> addToShopCart(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("settleShopCart")
    public Observable<BaseResponse<OperateResponseBean>> settleShopCart(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("submitOrder")
    public Observable<BaseResponse<OperateResponseBean>> submitOrder(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("getPayorderInfo")
    public Observable<BaseResponse<OperateResponseBean>> getPayorderInfo(@FieldMap Map<String,Object> params);

    @FormUrlEncoded
    @POST("interface.php?m=get_start_img")
    public Observable<BaseResponse<SplashResponseBean>> getStartImg(@FieldMap Map<String,Object> params);
}
